package com.mask.im.business.config;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

/**
 * 加密解密配置类
 * 
 * @author jian
 */
@Data
@Configuration
@ConfigurationProperties(prefix = "crypto")
public class CryptoConfig {
    
    /**
     * 加密密钥
     */
    private String key = "mask-im-default-key-16";
    
    /**
     * 字符集
     */
    private String charset = "UTF-8";
    
    /**
     * 是否启用加密解密
     */
    private boolean enabled = true;
    
    /**
     * 是否记录加密解密日志
     */
    private boolean logEnabled = false;
    
    /**
     * 加密算法
     */
    private String algorithm = "AES";
    
    /**
     * 密钥长度
     */
    private int keyLength = 16;
}
